package com.cicc.beergamevirtualsimulationsystem.service.recordInit;

import cn.hutool.core.util.ObjUtil;
import com.cicc.beergamevirtualsimulationsystem.common.enums.userTypeEnum.RoleType;
import org.springframework.stereotype.Component;

@Component
public class RecordInitFactory extends RecordInitExcludeRetailer{
    @Override
    public Integer getType() {
        return RoleType.FACTORY.getCode();
    }

    @Override
    public Integer setReceiverTotal(String userId) {
        return ObjUtil.isNotNull(recordEntityMapN.get(userId)) ? recordEntityMapN.get(userId).getPreReceiverTotal() : 0;
    }
}
